//
//  LQEmoticonCollectionViewCell.swift
//  Weibo
//
//  Created by ios on 16/8/17.
//  Copyright © 2016年 ios. All rights reserved.
//

import UIKit

class LQEmoticonCollectionViewCell: UICollectionViewCell {
    
    var index:NSIndexPath?{
        didSet{
            guard let index = index else{
              return
            }
            
            messgaelabel.text = "这是第\(index.section + 1)组，第\(index.item + 1)页"
        
        }
    }
    
    
     //MARK: -- 懒加载控件
    private lazy var messgaelabel: UILabel = {
    let label = UILabel()
        label.textColor = UIColor.whiteColor()
    return label
    }()
    override init(frame: CGRect) {
        super.init(frame: frame)
        setupUI()
    }

    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
    //设置控件 添加约束
    private func setupUI(){
     addSubview(messgaelabel)
        
        //设置约束
        
        messgaelabel.snp_makeConstraints { (make) -> Void in
            make.center.equalTo(contentView)
        }
    
    }
}
